<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改事件管理')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-evt-edit" th:object="${evt}">
        <input id="id" name="id" th:field="*{id}" type="hidden">
        <input id="ownerDeptId" name="ownerDeptId" th:field="*{ownerDeptId}" type="hidden"/>
        <div class="row">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-2 control-label is-required">事件编号：</label>
                    <div class="col-sm-10">
                        <input name="bh" th:field="*{bh}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-2 control-label">办结回复：</label>
                    <div class="col-sm-10">
                        <textarea id="completeFeedback" name="completeFeedback" class="form-control" rows="3" th:field="*{completeFeedback}"></textarea>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-2 control-label is-required">事件描述：</label>
                    <div class="col-sm-10">
                        <textarea id="contents" name="contents" class="form-control" rows="3" th:field="*{contents}"></textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-2 control-label">结案回复：</label>
                    <div class="col-sm-10">
                        <textarea id="endFeedback" name="endFeedback" class="form-control" rows="3" th:field="*{endFeedback}"></textarea>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-2 control-label is-required">事件类型：</label>
                    <div class="col-sm-10">
                        <div id="cxSelectEvtType" class="row">
                            <div class="col-sm-3">
                                <select id="evtTypeId1" name="evtTypeId1" class="type1 form-control m-b" th:data-value="*{evtTypeId1}"></select>
                            </div>
                            <div class="col-sm-3">
                                <select id="evtTypeId2" name="evtTypeId2" class="type2 form-control m-b" th:data-value="*{evtTypeId2}"></select>
                            </div>
                            <div class="col-sm-6">
                                <select id="evtTypeId3" name="evtTypeId3" class="type3 form-control m-b" th:data-value="*{evtTypeId3}"></select>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-2 control-label">事件标签：</label>
                    <div class="col-sm-10">
                        <select name="tagId" class="form-control" th:with="type=${@dict.getType('evt_tag')}">
                            <option value="">请选择</option>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{tagId}"></option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-2 control-label is-required">所属组织：</label>
                    <div class="col-sm-10">
                        <input id="ownerDeptFullTxt" name="ownerDeptFullTxt" class="form-control" type="text" th:field="*{ownerDeptFullTxt}" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-2 control-label is-required">所属部门：</label>
                    <div class="col-sm-10">
                        <div class="input-group">
                            <input id="ownerDeptName" name="ownerDeptName" class="form-control" type="text" onclick="selectDeptTree()" th:field="*{ownerDept.deptName}">
                            <span class="input-group-addon"><i class="fa fa-search"></i></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-2 control-label is-required">办结组织：</label>
                    <div class="col-sm-10">
                        <input id="doneDeptFullTxt" name="doneDeptFullTxt" class="form-control" type="text"  th:field="*{doneDeptFullTxt}" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-2 control-label">办结时间：</label>
                    <div class="col-sm-10">
                        <div class="input-group date">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            <input id="doneTime" name="doneTime" type="text" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" th:value="*{#calendars.format(doneTime,'yyyy-MM-dd HH:mm:ss')}" >
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-2 control-label is-required">结案组织：</label>
                    <div class="col-sm-10">
                        <input id="finishDeptFullTxt" name="finishDeptFullTxt" class="form-control" type="text"  th:field="*{finishDeptFullTxt}" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-2 control-label is-required">登记时间：</label>
                    <div class="col-sm-10">
                        <div class="input-group date">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            <input id="reportTime" name="reportTime" type="text" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" th:value="*{#calendars.format(reportTime,'yyyy-MM-dd HH:mm:ss')}" >
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-6">
                <div class="form-group">
                    <label class="col-sm-2 control-label">数据来源：</label>
                    <div class="col-sm-10">
                        <select name="sourceId" class="form-control" th:with="type=${@dict.getType('evt_source')}">
                            <option value="">请选择</option>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sourceId}"></option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: jquery-cxselect-js" />
<script th:inline="javascript">
    var prefix = ctx + "system/evt";
    $(function() {
        // 事件类型下拉框
        $.cxSelect.defaults.url = ctx + "system/type/evtTypeCxSelectData";
        $('#cxSelectEvtType').cxSelect({
            selects: ['type1', 'type2', 'type3'],
            jsonValue: 'v',
            nodata: 'none'
        });

        //办结时间
        layui.use('laydate', function() {
            var laydate = layui.laydate;
            laydate.render({
                elem: '#doneTime',
                type: 'datetime',
                trigger: 'click'
            });
        });

        //登记时间
        layui.use('laydate', function() {
            var laydate = layui.laydate;
            laydate.render({
                elem: '#reportTime',
                type: 'datetime',
                trigger: 'click'
            });
        });
    });
</script>
</body>
</html>